﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AddNewLoaiDanhMucControl.ascx.cs" Inherits="Hutech.CRM.Web.Controls.QuanLyDanhMucThongTin.AddNewLoaiDanhMucControl" %>
<%--Chưa Kiem tra null--%>
<script type="text/javascript" language="javascript">

    function ValidateFields() {
        var TextBoxName = document.getElementById("<%= txtTen.ClientID %>");

        var flag = true;
        var messageError = "";

        if (TextBoxName.value == "") {
            TextBoxName.focus();
            TextBoxName.style.background = 'Yellow';
            messageError = "1. Lỗi chưa nhập tên\n" + messageError;
            //alert("Lỗi chưa nhập họ và tên");
            flag = false;
        }
        if (messageError != "") alert(messageError);
        return flag;
    }
</script>
<%--<asp:UpdatePanel ID="UpdatePanelAddLoaiDanhMuc" runat="server" UpdateMode="Conditional"
    ChildrenAsTriggers="false">
    <ContentTemplate>--%>
        <div class="block-small">
            <div class="bs-header">
                Thêm mới loại danh mục
            </div>
            <div class="bs-content">
                Tên<br />
                <div class="input-control text">
                    <asp:TextBox ID="txtTen" runat="server" TabIndex="1"></asp:TextBox>
                    <%--<button class="btn-clear">
                    </button>--%>
                </div>
                Tên viết tắt<br />
                <div class="input-control text">
                    <asp:TextBox ID="txtVietTat" runat="server" TabIndex="2"></asp:TextBox>
                    <%--<button class="btn-clear">
                    </button>--%>
                </div>
                <asp:CheckBox ID="chkIsActive" runat="server" Text="&nbsp Kích hoạt" Checked="true" /><br />
            </div>
            <div class="bs-footer">
                <div class="f-left">
                    <asp:Button ID="ImageButtonSave" runat="server" CssClass="default" Text="Lưu" ToolTip="Lưu"
                        OnClientClick="return ValidateFields();" TabIndex="3" />
                    <asp:Button ID="ImageButtonCancel" runat="server" CssClass="default" Text="hủy" ToolTip="Hủy" TabIndex="4" />
                </div>
                <div class="f-left">
                    <asp:Label ID="lblMessageError" runat="server" CssClass="error" /></div>
            </div>
        </div>
<%--    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="ImageButtonSave" EventName="Click" />
        <asp:AsyncPostBackTrigger ControlID="ImageButtonCancel" EventName="Click" />
    </Triggers>
</asp:UpdatePanel>
--%>